// Copyright (C) 2010 nodchip.

// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, version 2.0.

// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License 2.0 for more details.

// A copy of the GPL 2.0 should have been included with the program.
// If not, see http://www.gnu.org/licenses/

#include "JitRecompilerTest.h"
#include "gtest/gtest.h"

TEST_F(JitRecompilerTest, addi_sample_0)
{
	// http://publib.boulder.ibm.com/infocenter/aix/v6r1/index.jsp?topic=/com.ibm.aix.aixassem/doc/alangref/addi.htm
	ppcState.gpr[5] = 0x00000900;
	UGeckoInstruction instruction;
	instruction.OPCD = 14;
	instruction.RD = 4;
	instruction.RA = 5;
	instruction.SIMM_16 = (int)0xFFFF8FF0;
	Execute(instruction.hex);
	EXPECT_EQ(0xFFFF98F0, ppcState.gpr[4]);
}
